Fix issue #26: P0 bug: bug: run-qa-agent.sh and run-report-…#121
Fix issue #26: P0 bug: bug: run-qa-agent.sh and run-report-…#121
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the agent runner shell scripts to be more self-contained by ensuring the shellforge binary exists before attempting to run the qa or report subcommands.
Changes:
- Add a “build
./shellforgeif missing” step toscripts/run-qa-agent.sh - Add a “build
./shellforgeif missing” step toscripts/run-report-agent.sh
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| scripts/run-report-agent.sh | Builds ./shellforge on demand before running ./shellforge report |
| scripts/run-qa-agent.sh | Builds ./shellforge on demand before running ./shellforge qa |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| set -euo pipefail | ||
| cd "$(dirname "$0")/.." | ||
|
|
||
| if [[ ! -f ./shellforge ]]; then |
There was a problem hiding this comment.
The build guard checks -f ./shellforge, but exec ./shellforge ... requires the binary to be executable. If shellforge exists without execute permissions (e.g., from an archive/checkout), this will skip the build and then fail at exec. Consider switching the check to [[ ! -x ./shellforge ]] (or verifying executability before exec).
| if [[ ! -f ./shellforge ]]; then | |
| if [[ ! -x ./shellforge ]]; then |
| if [[ ! -f ./shellforge ]]; then | ||
| echo "[run-qa-agent] Building shellforge..." | ||
| go build -o shellforge ./cmd/shellforge | ||
| fi |
There was a problem hiding this comment.
This script duplicates the same “build shellforge if missing” logic that already exists in scripts/run-agent.sh. To reduce duplication and keep behavior consistent, consider delegating to run-agent.sh (or extracting a shared helper) rather than re-implementing the build step here.
| set -euo pipefail | ||
| cd "$(dirname "$0")/.." | ||
|
|
||
| if [[ ! -f ./shellforge ]]; then |
There was a problem hiding this comment.
The build guard checks -f ./shellforge, but exec ./shellforge ... requires the binary to be executable. If shellforge exists without execute permissions, this will skip the build and then fail at exec. Consider switching the check to [[ ! -x ./shellforge ]] (or verifying executability before exec).
| if [[ ! -f ./shellforge ]]; then | |
| if [[ ! -x ./shellforge ]]; then |
| if [[ ! -f ./shellforge ]]; then | ||
| echo "[run-report-agent] Building shellforge..." | ||
| go build -o shellforge ./cmd/shellforge | ||
| fi | ||
|
|
||
| exec ./shellforge report "${1:-.}" |
There was a problem hiding this comment.
This script duplicates the same “build shellforge if missing” logic that already exists in scripts/run-agent.sh. To reduce duplication and keep behavior consistent, consider delegating to run-agent.sh (or extracting a shared helper) rather than re-implementing the build step here.
| if [[ ! -f ./shellforge ]]; then | |
| echo "[run-report-agent] Building shellforge..." | |
| go build -o shellforge ./cmd/shellforge | |
| fi | |
| exec ./shellforge report "${1:-.}" | |
| exec ./scripts/run-agent.sh report "${1:-.}" |
Auto-generated by Cata via /evolve dispatch
Task: brain-26-1775283561